﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Repositories;

namespace MyEartags.Hint
{
    public class DeliveryAppService : ApplicationService, IDeliveryAppService
    {
        private readonly IRepository<Delivery, int> _deliveryRepository;

        public DeliveryAppService(IRepository<Delivery, int> deliveryRepository)
        {
            _deliveryRepository = deliveryRepository;
        }

        /// <summary>
        /// 分娩提示信息
        /// </summary>
        /// <returns></returns>
        public async Task<List<DeliveryDto>> GetDeliveryList()
        {
            var list = await _deliveryRepository.GetListAsync();
            return ObjectMapper.Map<List<Delivery>, List<DeliveryDto>>(list);
        }
    }
}
